package cn.melonlib.cores.commons.comp.utils;

import cn.hutool.core.io.copy.ReaderWriterCopier;
import com.fasterxml.jackson.databind.ObjectMapper;
import okhttp3.OkHttpClient;
import org.apache.tika.Tika;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.support.ApplicationObjectSupport;
import org.springframework.expression.ExpressionParser;

@Configuration
public class ToolUtils extends ApplicationObjectSupport {

    @Bean("jsonMapper")
    public ObjectMapper jsonMapper(){
        return new ObjectMapper();
    }

    @Bean("httpClient")
    public OkHttpClient httpClient(){
        return new OkHttpClient();
    }

    @Bean("tika")
    public Tika tika(){
        return new Tika();
    }

    @Bean("readerWriterCopier")
    public ReaderWriterCopier readerWriterCopier(){
        return new ReaderWriterCopier();
    }

//    public ExpressionParser expressionParser(){
//        return ExpressionParser
//    }


}
